﻿@using CV.Resources
@model CV.Model.Person

@{
    ViewBag.Title = Resources.Create;
}
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <h2 class="page-header">@Resources.Create</h2>


    @using (Html.BeginForm())
    {
        @Html.AntiForgeryToken()

        <div class="form-horizontal">
            <h4>@Resources.Person</h4>
            <hr />
            @Html.ValidationSummary(true)

            <div class="form-group">
                @Html.LabelFor(model => model.LastName, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.LastName)
                    @Html.ValidationMessageFor(model => model.LastName)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.BirthName, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.BirthName)
                    @Html.ValidationMessageFor(model => model.BirthName)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.FirstName, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.FirstName)
                    @Html.ValidationMessageFor(model => model.FirstName)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.MartialStatus, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.MartialStatus)
                    @Html.ValidationMessageFor(model => model.MartialStatus)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.NumberOfChildren, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.NumberOfChildren)
                    @Html.ValidationMessageFor(model => model.NumberOfChildren)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.BirthDate, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.BirthDate)
                    @Html.ValidationMessageFor(model => model.BirthDate)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.PlaceOfBirth, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.PlaceOfBirth)
                    @Html.ValidationMessageFor(model => model.PlaceOfBirth)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.Nationality, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.Nationality)
                    @Html.ValidationMessageFor(model => model.Nationality)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.MotherId, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.MotherId)
                    @Html.ValidationMessageFor(model => model.MotherId)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.FatherId, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.FatherId)
                    @Html.ValidationMessageFor(model => model.FatherId)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.Notes, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.Notes)
                    @Html.ValidationMessageFor(model => model.Notes)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.Category, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.Category)
                    @Html.ValidationMessageFor(model => model.Category)
                </div>
            </div>

            <div class="form-group">
                <div class="col-md-offset-2 col-md-10">
                    <input type="submit" value=@Resources.Create class="btn btn-default" />
                </div>
            </div>
        </div>
    }

    <div>
        @Html.ActionLink(Resources.Back, "Index")
    </div>
</div>
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
